﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Transports.PresentationLayer
{
    class IOFile : IO
    {
        public static string input;
        public static string output;

        private StreamWriter writer;
        private StreamReader reader;

        public IOFile()
        {
            writer = new StreamWriter(output);
            reader = new StreamReader(input, Encoding.GetEncoding(1251));
        }

        ~IOFile()
        {
        }

        public void WriteLine(string text)
        {
            using (StreamWriter Newwriter = new StreamWriter("output.txt", true))
            {
                Newwriter.WriteLine(text);
            }
        }

        public string ReadLine()
        {
            return reader.ReadLine();
        }

        public int Read()
        {
            return reader.Read();
        }

        public void Write(string text)
        {
            using (StreamWriter Newwriter = new StreamWriter("output.txt", true))
            {
                Newwriter.Write(text);
            }
        }

        public void Pause(){}

        public char ReadChar() { return ' '; }

        public bool EOF()
        {
            return reader.EndOfStream;
        }
    }
}
